from django.shortcuts import HttpResponseRedirect, render
from django.utils.deprecation import MiddlewareMixin

white_List = ["/index/","/shopinfo/","/detailinfo/","/addbrand/","adminprofile","/adminuser/","/brandinfo/"]
class QtsAuthenticationMiddleware(MiddlewareMixin):
    def process_request(self, request):
        if request.path in white_List:
            if request.session.get('adminname') != None:
                pass
            else:
                return render(request,"404page.html")




